﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;

namespace EmProductCenter.pxjd
{
    public partial class wlpxyy : System.Web.UI.Page
    {
        Common.CommonClass common = new Common.CommonClass();
        BLL.ePioneer_Lecturer bllEPL = new BLL.ePioneer_Lecturer();
        public string strTeach = "";
        public string strLogin = "<a href='javascript:void(0);' onclick='Register();'>注册</a> <a href='javascript:void(0);' onclick='Login();'>登录</a>";
        public string strLogout = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List<Model.ePioneer_Lecturer> list = bllEPL.GetModelList("1=1");
                StringBuilder str = new StringBuilder();
                str.Append("<a href='javascript:void(0);'>全部讲师</a>");
                foreach (Model.ePioneer_Lecturer model in list)
                {
                    str.Append("<a href='javascript:void(0);'>" + model.Lecturer + "</a>");
                }
                strTeach = str.ToString();
                CheckLogin();
            }
        }

        /// <summary>
        /// 检查用户是否登录
        /// </summary>
        public void CheckLogin()
        {
            if (Session["LoginName"] != null)
            {
                strLogin = "<span>欢迎您：" + Session["LoginName"] + "</span>";
                strLogout = "<a href='../user/mycourse.aspx'>我的课程</a> <a href='javascript:void(0);' onclick='Logout();'>退出登录</a>";
                hid_userName.Value = Session["LoginName"].ToString();
            }
        }
    }
}